/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.edu.fatec.ads.bo;

import br.edu.fatec.ads.classes.Editora;
import br.edu.fatec.ads.dao.HibernateGenericDAO;
import java.util.List;
import org.hibernate.HibernateException;

/**
 *
 * @author Ubirajara
 */
public class BusinessObjectEditora implements IBusinessObject {

    private HibernateGenericDAO dao = null;

    public BusinessObjectEditora() {
        dao = new HibernateGenericDAO(Editora.class);
    }

    public void beginTransaction() {
        dao.beginTransaction();
    }

    public void commitTransaction() {
        dao.commitTransaction();
    }

    public void rollbackTransaction() {
        dao.rollbackTransaction();
    }

    public void clearSession() {
        dao.clearSession();
    }


    public List<Editora> recuperarTodasEditoras()
        throws HibernateException{

        return dao.findByCriterion(null);
    }

}